﻿
.columns(@columnSpan: 1, @shift: 0) {
  width: ((@gridColumnWidth * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - @shift)!important;
}


.clearfix() {
  zoom: 1;
	&:before,
	 &:after {
		content:"";
		display:table;
		zoom: 1;
		*display: inline;
	}
	&:after {
		clear: both;
	}
}

.reset(){
	
	*{
		margin: 0;
		padding: 0;
		-webkit-text-size-adjust: none!important;
	}

	ul, li
	{
		list-style: none;	
	}
	fieldset, form, iframe
	{
		border: 0;
	
	}
	textarea {
		overflow: auto;
	}
	em {
		font-style: normal;
	}
	img {
		border: 0 none;
	}
	abbr,article,aside,audio,canvas,datalist,details,
	figure,footer,header,hgroup,mark,menu,meter,nav,output,
	progress,section,summary,time,video {
		display: block;
	}
	time {
		display: inline;
	}
}

/* Border Radius*/
.border-radius(@radius: 2px) {
  #border-radius > .all(@radius);
}
#border-radius {
	.all (@radius: 2px){
		-webkit-border-radius: @radius;
		-moz-border-radius: @radius;
		border-radius: @radius;
	}
	.topright(@radius:2px){
		-webkit-border-top-right-radius: @radius;
		-moz-border-radius-topright: @radius;
		border-top-right-radius: @radius;
	}
	.topleft(@radius:2px){
		-webkit-border-top-left-radius: @radius;
		-moz-border-radius-topleft: @radius;
		border-top-left-radius: @radius;
	}
	.bottomright(@radius:2px){
		-webkit-border-bottom-right-radius: @radius;
		-moz-border-radius-bottomright: @radius;
		border-bottom-right-radius: @radius;
	}
	.bottomleft(@radius:2px){
		-webkit-border-bottom-left-radius: @radius;
		-moz-border-radius-bottomleft: @radius;
		border-bottom-left-radius: @radius;
	}
}
/* Drop shadows*/
.box-shadow(@shadow: 0 1px 3px rgba(0,0,0,.25)) {
  -webkit-box-shadow: @shadow;
     -moz-box-shadow: @shadow;
          box-shadow: @shadow;
}
.transition(@transition) {
	-webkit-transition: @transition;
	   -moz-transition: @transition;
 	    -ms-transition: @transition;
	     -o-transition: @transition;
	        transition: @transition;
}


.gradient (@startColor: #555, @endColor: #333) {
	background-color: @endColor;
	background-repeat: repeat-x;
	background-image: -khtml-gradient(linear, left top, left bottom, from(@startColor), to(@endColor)); // Konqueror
	background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+
	background-image: -ms-linear-gradient(top, @startColor, @endColor); // IE10
	background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, @startColor), color-stop(100%, @endColor)); // Safari 4+, Chrome 2+
	background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+
	background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10
	background-image: linear-gradient(top, @startColor, @endColor); // The standard
	filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down
}

.arrowreset() {
	right: auto;
	bottom: auto;
	left: auto;
	top: auto;
	border: 1px solid;
}

#arrow {

  .above(@arrowWidth: 5px) {
	/* reset first */
	left: 50%;
    top: -@arrowWidth;
	border-width:0 @arrowWidth @arrowWidth; 
    border-style:solid;
	border-top-color: transparent;
    border-top-color: fadeout(#fff, 100%);
	border-right-color: transparent;
	border-right-color: fadeout(#fff, 100%);
	border-left-color:transparent;
	border-left-color:fadeout(#fff, 100%);
	
  }
  .left(@arrowWidth: 5px) {
    top: 30%;
    left: -@arrowWidth - 1;
	border-width: (@arrowWidth + 1); 
	border-left-width: 0;
    border-style:solid;
	border-top-color: transparent;
    border-top-color: fadeout(#fff, 100%);
	border-bottom-color: transparent;
	border-bottom-color:fadeout(#fff, 100%);
	border-left-color: transparent;
	border-left-color: fadeout(#fff, 100%);
	
  }
  .below(@arrowWidth: 5px) {
    left: 50%;
    bottom: -@arrowWidth;
	border-width:@arrowWidth @arrowWidth 0; 
    border-style:solid;
	border-right-color:transparent;
	border-right-color:fadeout(#fff, 100%);
	border-bottom-color:transparent;
	border-bottom-color: fadeout(#fff, 100%);
	border-left-color:transparent;
	border-left-color: fadeout(#fff, 100%);
	

  }
  .right(@arrowWidth: 5px) {
    top: 30%;
    right: -@arrowWidth;
	border-width:@arrowWidth 0 @arrowWidth @arrowWidth; 
    border-style:solid;
	border-top-color: transparent;
    border-top-color: fadeout(#fff, 100%);
	border-right-color: transparent;
	border-right-color: fadeout(#fff, 100%);
	border-bottom-color: transparent;
	border-bottom-color: fadeout(#fff, 100%);
  }
}

#pointer {
 .left(@arrowWidth: 6px){
	margin-right: @arrowWidth + 2;
	.arrowreset();
	#arrow > .left(@arrowWidth);
 }
  .up(@arrowWidth: 6px){
	margin-right: @arrowWidth + 2;
	.arrowreset();
	#arrow > .above(@arrowWidth);
 } 
 .down(@arrowWidth: 6px){
	margin-right: @arrowWidth + 2;
	.arrowreset();
	#arrow > .below(@arrowWidth);
 }
  .right(@arrowWidth: 6px){
	margin-right: @arrowWidth + 2;
	#arrow > .right(@arrowWidth);
 }
  .diagonalupleft(@arrowWidth: 8px){
	margin-right: @arrowWidth;
	.arrowreset();
	#arrow > .right(@arrowWidth);
	border-top-width: 0;
 }
 .diagonalupright(@arrowWidth: 8px){
	margin-right: @arrowWidth;
	.arrowreset();
	#arrow > .left(@arrowWidth);
	border-top-width: 0;
 }
 .diagonaldownleft(@arrowWidth: 8px){
	margin-right: @arrowWidth;
	.arrowreset();
	#arrow > .right(@arrowWidth);
	border-bottom-width: 0;
 }
 .diagonaldownright(@arrowWidth: 8px){
	margin-right: @arrowWidth;
	/* reset */
	.arrowreset();
	#arrow > .left(@arrowWidth);
	border-bottom-width: 0;
 }
}

/* Opacity*/
.opacity(@opacity: 100) {
	filter: e(%("alpha(opacity=%d)", @opacity));
	-khtml-opacity: @opacity / 100;
	  -moz-opacity: @opacity / 100;
	       opacity: @opacity / 100;
}
